﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Sunny.UI;
namespace project.UI.sdudent
{
    class StudentForm :UIHeaderMainFrame
    {

        private void InitializeComponent()
        {
            System.Windows.Forms.TreeNode treeNode1 = new System.Windows.Forms.TreeNode("查看馆藏");
            System.Windows.Forms.TreeNode treeNode2 = new System.Windows.Forms.TreeNode("我的借阅");
            System.Windows.Forms.TreeNode treeNode3 = new System.Windows.Forms.TreeNode("我的信息");
            this.SuspendLayout();
            // 
            // Header
            // 
            treeNode1.Name = "节点0";
            treeNode1.Text = "查看馆藏";
            treeNode2.Name = "节点1";
            treeNode2.Text = "我的借阅";
            treeNode3.Name = "节点2";
            treeNode3.Text = "我的信息";
            this.Header.Nodes.AddRange(new System.Windows.Forms.TreeNode[] {
            treeNode1,
            treeNode2,
            treeNode3});
            this.Header.Size = new System.Drawing.Size(1271, 64);
            // 
            // StudentForm
            // 
            this.ClientSize = new System.Drawing.Size(1271, 731);
            this.Name = "StudentForm";
            this.Text = "NPWU图书管理系统-学生界面";
            this.ResumeLayout(false);

        }
        public StudentForm()
        {
            InitializeComponent();
            Header.TabControl = MainTabControl;

            //增加页面到Main
            AddPage(new LookBook(), 1001);
            AddPage(new MyRent(), 1002);
            AddPage(new MyInfo(), 1003);

            //设置Header节点索引
            Header.SetNodePageIndex(Header.Nodes[0], 1001);
            Header.SetNodePageIndex(Header.Nodes[1], 1002);
            Header.SetNodePageIndex(Header.Nodes[2], 1003);

            //显示默认界面
            Header.SelectedIndex = 0;
        }
    }
}
